#!/usr/bin/env python
# -*- coding: utf-8 -*-

import tool_misc as tm

l = [0,2,3,2,1,5,2,4]
l_pop = tm.pop_val(l,2)
print 'l :: ', l
print 'l_pop :: ', l_pop
print

d = {'k1': [0,1], 'k2':['a','b'], 'k3':[]}
print 'd :: ', d
tm.dict_append(d,'k1', 2)
tm.dict_append(d,'k4', 'w1')
print 'd :: ', d
print

dr = tm.drange(0,2,0.25)
print 'dr :: ', dr
l_inter = [(v,v+0.5) for v in dr]
print 'l_inter :: ', l_inter
print

val_search = 0.77
i = tm.dicho_find_inter(l_inter, val_search)
print 'i :: ', i
print 'l_inter[i] :: ', l_inter[i]
val_search = 0.75
j = tm.dicho_find(dr, val_search)
print 'j :: ', j
print 'dr[j] :: ', dr[j]
